namespace et {
    export enum LOG_LEVEL {
        NONE = 0,
        DEBUG = 1,
        INFO = 1 << 1,
        RESULT = 1 << 2,
        WARN = 1 << 3,
        ERROR = 1 << 4
    }
    export class LogUtil {
        private static logLevel = LOG_LEVEL.DEBUG;
        public static get LogLevel() {
            return this.logLevel;
        }
        public static set LogLevel(loglevel: LOG_LEVEL) {
            this.logLevel = loglevel;
            if ((this.LogLevel & LOG_LEVEL.DEBUG) == LOG_LEVEL.DEBUG) {
                LogUtil.debug = console.log.bind(console);
            }
            else {
                LogUtil.debug = (message?: any, ...optionalParams: any[]) => { }
            }
            if ((this.LogLevel & LOG_LEVEL.INFO) == LOG_LEVEL.INFO) {
                LogUtil.info = console.info.bind(console);
            }
            else {
                LogUtil.info = (message?: any, ...optionalParams: any[]) => { }
            }
            if ((this.LogLevel & LOG_LEVEL.RESULT) == LOG_LEVEL.RESULT) {
                LogUtil.result = console.log.bind(console);
            }
            else {
                LogUtil.result = (message?: any, ...optionalParams: any[]) => { }
            }
            if ((this.LogLevel & LOG_LEVEL.WARN) == LOG_LEVEL.WARN) {
                LogUtil.warn = console.warn.bind(console);
            }
            else {
                LogUtil.warn = (message?: any, ...optionalParams: any[]) => { }
            }
            if ((this.LogLevel & LOG_LEVEL.ERROR) == LOG_LEVEL.ERROR) {
                LogUtil.error = console.error.bind(console);
            }
            else {
                LogUtil.error = (message?: any, ...optionalParams: any[]) => { }
            }
        }
        public static debug: (message?: any, ...optionalParams: any[]) => void;
        public static info: (message?: any, ...optionalParams: any[]) => void;
        public static result: (message?: any, ...optionalParams: any[]) => void;
        public static warn: (message?: any, ...optionalParams: any[]) => void;
        public static error: (message?: any, ...optionalParams: any[]) => void;
    }
    LogUtil.LogLevel = LOG_LEVEL.DEBUG;
}